<include file="header" />
<div class="wraper nearby-branch-wrap">
    <div class="load">
        <img class="load-bee" src="/assets/base/laundry/images/load-bee.png">

    </div>
	<div class="head clearfix">
		<a href="javascript:history.back();" class="iconfont icon-zuo pull-left"></a>
		<span class="head-name pull-left">查看网点</span>
		<a href="{BEESCRM::U('/Base/laundry/index',array('laundryId'=>$laundryId))}" class="iconfont icon-shouye pull-left text-right"></a>
	</div>
	<volist name="data" id="vo">
	<!-- <a href="{BEESCRM::U('/base/laundry/nearDetail',array('laundryId'=>$laundryId))}" class="branch-lists">
		<div class="branch-table">
			<div class="branch-col">
				<div class="branch-name">
					<span class="iconfont icon-location"></span><span class="describ">{BEESCRM:$vo.website_name}</span>
				</div>
				<div class="branch-info">
					<span class="iconfont icon-xiyiji"></span><span class="describ">该网点共有{BEESCRM:$vo.count}台洗衣设备</span>
				</div>
			</div>
			<div class="branch-col">
				<div class="branch-distance">
					 距离您{BEESCRM:$vo.distance}公里
				</div>
				<div class="branch-num">
					当前可用 <span class="strong-blue">{BEESCRM:$vo.over_count}个</span>
				</div>
			</div>
			<a class="branch-col" href="{BEESCRM::U('/base/laundry/nearDetail',array('laundryId'=>$laundryId,'longitude'=>$longitude,'latitude'=>$latitude))}">
                <div class="branch-detail iconfont">&#xe601</div>
            </a>
		</div>
	</a> -->
	<a href="{BEESCRM::U('/base/laundry/nearDetail',array('laundryId'=>$laundryId,'longitude'=>$longitude,'latitude'=>$latitude,'website_id'=>$vo['website_id']))}" class="branch-lists">
		<div class="branch-table">
			<div class="branch-col">
				<div class="branch-name">
					<span class="iconfont icon-location"></span><span class="describ">{BEESCRM:$vo.website_name}</span>
				</div>
				<div class="branch-info">
					<span class="iconfont icon-xiyiji"></span><span class="describ">该网点共有{BEESCRM:$vo.count}台洗衣设备</span>
				</div>
			</div>
			<div class="branch-col">
				<div class="branch-distance">
					 距离您{BEESCRM:$vo.distance}公里
				</div>
				<div class="branch-num">
					当前可用 <span class="strong-blue">{BEESCRM:$vo.over_count}个</span>
				</div>
			</div>
			<div class="branch-col">
				<div class="branch-detail iconfont">&#xe602;</div>
			</div>
		</div>
	</a>
	</volist>
	<div class="bottom-box">
		<p class="copyright">杭州青橄榄网络技术有限公司 技术支持</p>
	</div>
</div>
<include file="commonJS" />
<script type="text/javascript">
	wx.config({
		debug: false,
		appId: "{BEESCRM:$appid}",
		timestamp: "{BEESCRM:$timestamp}",
		nonceStr: "{BEESCRM:$noncestr}",
		signature: "{BEESCRM:$signature}",
		jsApiList: ['checkJsApi','onMenuShareTimeline','onMenuShareAppMessage','hideOptionMenu','scanQRCode','openLocation','getLocation'],
	});
	
	wx.ready(function(){
		/* var url = '';
		var imgUrl = '';
		var title = '平安充电';
		var desc = ''; */
		//分享到朋友圈
		wx.onMenuShareTimeline({
			/*title: title, // 分享标题
			 link: url, // 分享链接
			imgUrl: imgUrl, // 分享图标 */
			success: function () { 
				share(); 
			},
			cancel: function () { 
				// 用户取消分享后执行的回调函数
				/* alert('已取消'); */
			}
		});
		//发送给好友
		wx.onMenuShareAppMessage({
			/*title: title, // 分享标题
			desc: desc, // 分享描述
			link: url, // 分享链接
			imgUrl: imgUrl,*/ // 分享图标
			type: '', // 分享类型,music、video或link，不填默认为link
			dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
			success: function () { 
				// 用户确认分享后执行的回调函数
				share();
			},
			cancel: function () { 
				// 用户取消分享后执行的回调函数
			}
		});
		var data='{BEESCRM:$data}';
		if(data==''){
			wx.getLocation({
			    type: 'wgs84', // 默认为wgs84的gps坐标，如果要返回直接给openLocation用的火星坐标，可传入'gcj02'
			    success: function (res) {
			        var latitude = res.latitude; // 纬度，浮点数，范围为90 ~ -90
			        var longitude = res.longitude; // 经度，浮点数，范围为180 ~ -180。
			        var speed = res.speed; // 速度，以米/每秒计
			        var accuracy = res.accuracy; // 位置精度
			        var data={};
	        		data.latitude=latitude;
	        		data.longitude=longitude;
	        		data.precision=accuracy;
	        		data.event='LOCATION';
	        		data.type='event';
	        		data.origin='fans';
	    			var json={};
	    			json.method='post';
	    			json.type='json';
	    			json.url="{BEESCRM::U('/base/Laundry/getLocation',array('laundryId'=>$laundryId))}";
	    			json.data=data;
	    			$.getAjax(json,false,reload,'');
			    }
			});
			function reload(){
	    		setTimeout('location.href=location.href',3000);
	    	}
		}	
	});
	
	var height = $(document).height();
	var bottombox_height = $('.bottom-box').outerHeight();
	$('.wraper').css("minHeight",height);
	$('.wraper').css("paddingBottom",bottombox_height);


	$(function(){
		var height = $(document).height();
		var height_head = $('.head').outerHeight();
		var contain_h = height - height_head;
		$('.logistics').css("minHeight",contain_h);
	});

	$(window).load(function(){
		$('.load').hide();
	});
</script>
</body>
</html>